package com.zhangkunhao.notes.entity.bo;


/**
 * 封装返回前端的对象
 *
 * @author 20642
 */
public class Message<T> {
    private T t;
    private String result;
    private Integer status;

    public Message() {
    }

    public Message(T t, String result, Integer status) {
        this.t = t;
        this.result = result;
        this.status = status;
    }

    /**
     * 获取
     *
     * @return t
     */
    public T getT() {
        return t;
    }

    /**
     * 设置
     *
     * @param t:返回给前端的对象
     */
    public void setT(T t) {
        this.t = t;
    }

    /**
     * 获取
     *
     * @return result
     */
    public String getResult() {
        return result;
    }

    /**
     * 设置
     *
     * @param result：返回给前端的操作结果
     */
    public void setResult(String result) {
        this.result = result;
    }

    /**
     * 获取
     *
     * @return status
     */
    public Integer getStatus() {
        return status;
    }

    /**
     * 设置
     *
     * @param status：返回给前端的状态码，0失败，1成功
     */
    public void setStatus(Integer status) {
        this.status = status;
    }

    @Override
    public String toString() {
        return "Message{t = " + t + ", result = " + result + ", status = " + status + "}";
    }
}
